// birthday.js
const app = getApp()
Page({
  data: {
    birthdays: []
  },
  onLoad: function () {
    this.setData({
      birthdays: app.globalData.birthdays
    })
  },
  viewBirthdayDetail: function (e) {
    const index = e.currentTarget.dataset.index
    const birthday = this.data.birthdays[index]
    wx.showModal({
      title: birthday.name + '的生日',
      content: '日期：' + birthday.date,
      showCancel: false
    })
  }
})
